<template>
<h1>EL单选组件</h1>
  <el-radio-group v-model="gender">
    <el-radio label="1">男</el-radio>
    <el-radio label="0">女</el-radio>
  </el-radio-group>
  <h4>你要提交的值：{{ gender }}</h4>
  <hr>
  <el-radio-group v-model="education">
    <el-radio label="学历：本科" value="bk"></el-radio>
    <el-radio label="学历：大专" value="dz"></el-radio>
    <el-radio label="学历：高中" value="gz" ></el-radio>
    <el-radio label="学历：初中" value="cz" ></el-radio>
  </el-radio-group>
  <h4>你选择的结果：{{ education }}</h4>
  <hr>
<!--  <el-radio-group v-model="level">-->
<!--    <el-radio label="员工" value="10"></el-radio>-->
<!--    <el-radio label="经理" value="20"></el-radio>-->
<!--    <el-radio label="总监" value="30"></el-radio>-->
<!--    <el-radio label="总裁" value="40"></el-radio>-->
<!--  </el-radio-group>-->

  <el-radio-group v-model="level">
    <el-radio v-for="item in arr" :label="item.value" :key="item.value">{{ item.level }}</el-radio>
  </el-radio-group>
    <h4>你选择的职位：{{ level }}</h4>
  <hr></hr>
  <el-radio-group v-model="pr">
    <el-radio v-for="p in arr2" :label="p.price" :value="p.price">{{ p.level }}</el-radio>
  </el-radio-group>
  <h4>你选择的酒价：{{ pr }}<</h4>
</template>


<script setup>
import {ref} from "vue";

const gender = ref('1');
const education = ref('bk');
const level = ref('40');

const arr = ref([
  {level:'员工', value:'10'},
  {level:'经理', value:'20'},
  {level:'总监', value:'30'},
  {level:'总裁', value:'40'},
  {level:'CEO', value:'50'},
])

const pr = ref('2500');
const arr2 = ref([
  {level:'五粮液', price:'500'},
  {level:'茅台', price:'2500'},
  {level:'汾酒', price:'330'},
  {level:'梦之蓝', price:'368'},
])
</script>


<style scoped>

</style>